﻿@{
    ViewBag.Title = "供应商详细";
    Layout = "~/Areas/Shared/_spEdit.cshtml";
}
@model Kaiser.Modules.Hiner.Models.Supplier.SupplierBase
<script type="text/javascript">
    $(function () {

        $("#ViewProductDetail").click(function () {
            stopPropagation();
            var id = $(this).attr("name");
            dialog = parent.jQuery.createWin({
                title: "产品详细",
                url: '@Url.Action("ProductDetail", "ProductManage")?id=' + id,
                height: 400,
                width: 600,resizable:true,
                isIframe: true,
                maximizable:true,
                toolbar: [

                        {
                            text: '关闭',
                            iconCls: "icon-no",
                            handler: function () {
                                dialog.dialog("close");
                            }
                        }
                    ]
            });
        })
        $('#dg').datagrid('reload');
    })
        
   
   
</script>
<table>
    <tr>
        <td align="center">
            <b>供应商编码</b>
        </td>
        <td align="center">
            <b>供应商代号</b>
        </td>
        <td align="center">
            <b>供应商中文名</b>
        </td>
        <td align="center">
            <b>供应商联系方式及联系人</b>
        </td>
    </tr>
    <tr>
        <td align="center">
            @Model.SupplierCode
        </td>
        <td align="center">
            @Model.SupplierTypeCode
        </td>
        <td align="center">
            @Model.SupplierName
        </td>
        <td align="center">
            @Model.SupplierLinkManName , @Model.SupplierContactWay
        </td>
    </tr>
    <tr>
        <td align="center">
            <b>供应商英文名</b>
        </td>
        <td colspan="3">
            @Model.SupplierEnglishName
        </td>
    </tr>
    <tr>
        <td align="center">
            <b>地址</b>
        </td>
        <td colspan="3">
            @Model.SupplierAddress
        </td>
    </tr>
    <tr>
        <td align="center">
            <b>TEL</b>
        </td>
        <td colspan="3">
            @Model.SupplierTel
        </td>
    </tr>
    <tr>
        <td align="center">
            <b>FAX</b>
        </td>
        <td colspan="3">
            @Model.SupplierFax
        </td>
    </tr>
    <tr>
        <td colspan="4">
            <b>THE INFORMATION OF REMITTANCE</b>
        </td>
    </tr>
    <tr>
        <td colspan="4">
            @Model.SupplierRemittance
        </td>
    </tr>
</table>
<table style="text-align: center; " class="easyui-datagrid" id="dg">
    <thead>
        <tr>
            <th field="name1"  rowspan="2">
                No.
            </th>
            <th field="name2" rowspan="2">
                Item
            </th>
            <th field="name3" rowspan="2">
                HDE Code
            </th>
            <th field="name4" rowspan="2">
                HINNER Code
            </th>
            <th field="name5" rowspan="2">
                SUP.ITEM
            </th>
            <th field="name6" rowspan="2">
                OE Ref.
            </th>
             
        </tr>
        
    </thead>
    <tbody>
        @for (int i = 0; i < Model.ProductList.Count; i++)
        {
        
            <tr>
                <td>
                    @(i + 1)
                </td>
                <td>
                    <a id="ViewProductDetail" name="@Model.ProductList[i].ProductId" href="#" onclick="ViewProductDetail(@Model.ProductList[i].ProductId)">@Model.ProductList[i].ProductName</a>
                </td>
                <td>
                    @Model.ProductList[i].ProductHDECode
                </td>
                <td>
                    @Model.ProductList[i].ProductHinerCode
                </td>
                <td>
                    @Model.ProductList[i].SupplierCode
                </td>
                <td>
                    @Model.ProductList[i].ProductOERef
                </td>
                 
            </tr>
        }
    </tbody>
</table>
